
#ifndef __H_module_Vector_H__
#define __H_module_Vector_H__

#include <Allocator.h>
#include <Ut.h>





#include <ds_base.h>

typedef struct Vector_obj__ Vector_obj;
struct Vector_obj__
{
    char* start;
    char* end;
    char* margin;
    int element_size;
};





void Vector_DemoKeep(void** DS_ERROR);



void Vector_UnitTest(void** DS_ERROR);



void Vector_Init(Vector_obj* self, int e_size,void** DS_ERROR);



void Vector_Deinit(Vector_obj* self,void** DS_ERROR);



int Vector_ESize(Vector_obj* self,void** DS_ERROR);



int Vector_Capacity(Vector_obj* self,void** DS_ERROR);



int Vector_Size(Vector_obj* self,void** DS_ERROR);



void Vector_SetESize(Vector_obj* self, int new_e_size,void** DS_ERROR);



void Vector_SetCapacity(Vector_obj* self, int capa,void** DS_ERROR);



void Vector_SetSize(Vector_obj* self, int sz,void** DS_ERROR);



int Vector_NeedMemory(Vector_obj* self, int e_num,void** DS_ERROR);



void Vector_EnsureMemoryEnough(Vector_obj* self, int e_number,void** DS_ERROR);



void Vector_Clear(Vector_obj* self,void** DS_ERROR);



void Vector_Reverse(Vector_obj* self,void** DS_ERROR);



void Vector_Swap(Vector_obj* self, int i1, int i2,void** DS_ERROR);



void* Vector_PopI(Vector_obj* self, int i,void** DS_ERROR);



void Vector_Push(Vector_obj* self, void* e,void** DS_ERROR);



void Vector_PushCustom(Vector_obj* self, void* e, void* (*copy_proc)(void*,void**),void** DS_ERROR);



void* Vector_Pop(Vector_obj* self,void** DS_ERROR);



void Vector_PushUncheck(Vector_obj* self, void* e,void** DS_ERROR);



void* Vector_At(Vector_obj* self, int n,void** DS_ERROR);



void Vector_Delete(Vector_obj* self, void* e,void** DS_ERROR);



int Vector_Find(Vector_obj* self, void* e,void** DS_ERROR);



ds_bool Vector_Same(Vector_obj* self, Vector_obj* that,void** DS_ERROR);



void Vector_Merge(Vector_obj* self, Vector_obj* ext,void** DS_ERROR);



void* Vector_Begin(Vector_obj* self,void** DS_ERROR);



int Vector_NotEnd(Vector_obj* self, void* Iter,void** DS_ERROR);



void* Vector_Next(Vector_obj* self, void* iter,void** DS_ERROR);



#endif //__H_module_Vector_H__

